﻿using System.Windows.Forms;
using System.Diagnostics;

namespace DotNet.Common
{
	class ProcessBarApp
	{
		ToolStripProgressBar m_processBar;

		public void Load(ToolStripProgressBar processBar)
		{
			Debug.Assert(processBar != null);

			m_processBar = processBar;
			m_processBar.Visible = false;
		}

		public void Start()
		{
			m_processBar.Value = 0;
			m_processBar.Visible = true;
		}

		public void Stop()
		{
			m_processBar.Visible = false;
		}

		public void Update(int value)
		{
			m_processBar.Value = value;
		}
	}
}
